package excercise;

import java.security.Permissions;
import java.util.Scanner;

public class EX05_Q32 {
	

	
	public static void main(String[] args) {
		System.out.println("# 주민번호 유효성 검사 주민번호를 입력해주세요.");
		JuminVO sdf = new JuminVO();
		Scanner sc = new Scanner(System.in);
		sdf.setJunum(sc.nextLong());
		JuminService.gab(sdf.getJunum(), sdf);
		
	}

}

class JuminVO{
	private long junum;
	private long gab;
	
	public JuminVO() {	}
	
	
	public void setJunum(long junum){this.junum = junum;}
	public void setGab(long gab){this.gab = gab;}
	
	public long getJunum(){	return this.junum;	}
	public long getGab(){return this.gab;}
}

class JuminService{
	
	static void gab(long junum,JuminVO sdf){
		long gab = 0;
	for(long d=1000000000000L,e=2; e <=9; d/=10,e++){
		gab += ((junum/d)%10)*e;
	}
	for(long d=10000L,e=2; e<=5; d/=10,e++){
		gab += ((junum/d)%10)*e;
	}
	
	if((11-gab%11)%10 == junum%10){
		System.out.println("정상 주민번호 입니다.");	}
	else{System.out.println("잘못된 주민번호 입니다.");
	}
	
}
}
